package com.java.star.novel.utils;


import com.java.star.novel.core.bean.ConciseUser;

/**
 * @author 零限
 * @date 2023/6/25
 */
public class ThreadLocalUtil {
    private static final ThreadLocal<ConciseUser> conciseUserHolder;

    static {
        conciseUserHolder = new ThreadLocal<>();
    }

    public static ConciseUser getConciseUser() {
        return conciseUserHolder.get();
    }

    public static void saveConciseUser(ConciseUser conciseUser) {
        conciseUserHolder.set(conciseUser);
    }

    public static void removeConciseUser() {
        conciseUserHolder.remove();
    }
}
